<?php
/*
 *author:Yangligao
 *Date:2013-9-20
 */
require 'Config.php';
//包含友情链接部分
require 'Public/Include/footer.php';
//得到合作加盟部分的信息
$joinCpModel = new JoinCpModel();
$joinData = $joinCpModel->joincp_select();
$smarty->assign('joinData',$joinData);

//包含给广告复制的一部分
require 'Public/Include/adv.php';

//菜谱信息区域
$menuModel = new MenuModel();
$menuData = $menuModel->menu_select("menu_id,menu_name,menu_pic",'','limit 10');
$smarty->assign('menuData',$menuData);

$foodModel = new FoodModel();

//儿童食品区域
$chirldRes = $foodModel->food_select("food_id,food_name,food_pic",'where food_type=3','limit 10','order by food_addtime desc');
$smarty->assign('chirldRes',$chirldRes);

//节令食品区域
$dayRes = $foodModel->food_select("food_id,food_name,food_pic",'where food_type=1','limit 10','order by food_addtime desc');
$smarty->assign('dayRes',$dayRes);

//四节食品区域
$seasonRes = $foodModel->food_select("food_id,food_name,food_pic",'where food_type=2','limit 10','order by food_addtime desc');
$smarty->assign('seasonRes',$seasonRes);

$smarty->assign('positionFlag','首页');

$goodRes = $foodModel->food_select('food_id,food_pic,food_name,food_singleprice,food_userprice',"where food_state='1'",'limit 4','order by food_count desc');
$smarty->assign('goodRes',$goodRes);






//search
require 'Public/Include/search.php';
$smarty->display('Index/index.html');
?>
